﻿
/*----------------------------------------------------------------//
// 文件名：MoAssSubBranch.cs
// 文件功能描述：实体 MoAssSubBranch.
// 
// 创建标识：Template  ver 5.0.20090429 2009-07-10
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoAssSubBranch
using System;
using System.Data;
namespace Las.Model
{
	/// <summary>
	/// 业务实体MoAssSubBranch
	/// </summary>
	public partial class MoAssSubBranch:ICloneable
	{
		#region 表AssSubBranch的字段
		private string asisId;
		private string assSubBranchId;
		private string assSubBranchName;
		private string asbLev;
		#endregion
		
		#region 构造函数
		public MoAssSubBranch()
		{
			     	    
		   
		}
		#endregion
		
		#region 拷贝构造函数

		public MoAssSubBranch(MoAssSubBranch item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoAssSubBranch(string asisId,string assSubBranchId,string assSubBranchName,string asbLev)
		{
		this.asisId=asisId;
		this.assSubBranchId=assSubBranchId;
		this.assSubBranchName=assSubBranchName;
		this.asbLev=asbLev;
		}
		#endregion
		
		#region 表AssSubBranch的字段属性
		/// <summary>
		///主键
		/// </summary>
		public string AsisId
		{
			get {return asisId;}
			set {asisId=value;}
		}
		/// <summary>
		/// ASS_SUB_BRANCH_ID
		/// </summary>
		public string AssSubBranchId
		{
			get {return assSubBranchId;}
			set {assSubBranchId=value;}
		}
		/// <summary>
		/// ASS_SUB_BRANCH_NAME
		/// </summary>
		public string AssSubBranchName
		{
			get {return assSubBranchName;}
			set {assSubBranchName=value;}
		}
		/// <summary>
		/// ASB_LEV
		/// </summary>
		public string AsbLev
		{
			get {return asbLev;}
			set {asbLev=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoAssSubBranch CopyTo(MoAssSubBranch item)
        {
		    item.asisId=this.asisId;
		    item.assSubBranchId=this.assSubBranchId;
		    item.assSubBranchName=this.assSubBranchName;
		    item.asbLev=this.asbLev;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoAssSubBranch mo=new MoAssSubBranch();
		    mo.AsisId=this.AsisId;
		    mo.AssSubBranchId=this.AssSubBranchId;
		    mo.AssSubBranchName=this.AssSubBranchName;
		    mo.AsbLev=this.AsbLev;
			return mo;
		}
				///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {		 
            if (object.ReferenceEquals(this,obj))
            {
                return true;
            }
            else
            {
                MoAssSubBranch NewAssSubBranch = obj as MoAssSubBranch;
                if (NewAssSubBranch == null)
                {
                    return false;
                }
                else
                {
				if (NewAssSubBranch.AsisId==this.AsisId && NewAssSubBranch.AssSubBranchId==this.AssSubBranchId && NewAssSubBranch.AssSubBranchName==this.AssSubBranchName && NewAssSubBranch.AsbLev==this.AsbLev)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format(System.Globalization.CultureInfo.InvariantCulture,"AsisId={0}/AssSubBranchId={1}/AssSubBranchName={2}/AsbLev={3}",asisId,assSubBranchId,assSubBranchName,asbLev);
		 
		}
		#endregion
		
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["Asis_ID"]!=null && row["Asis_ID"]!=DBNull.Value)
			{
			    this.AsisId = (string)row["Asis_ID"];
			}
			else
			{
				this.AsisId =string.Empty;
			}
		    if(row["Ass_Sub_Branch_ID"]!=null && row["Ass_Sub_Branch_ID"]!=DBNull.Value)
			{
			    this.AssSubBranchId = (string)row["Ass_Sub_Branch_ID"];
			}
			else
			{
				this.AssSubBranchId =string.Empty;
			}
		    if(row["Ass_Sub_Branch_Name"]!=null && row["Ass_Sub_Branch_Name"]!=DBNull.Value)
			{
			    this.AssSubBranchName = (string)row["Ass_Sub_Branch_Name"];
			}
			else
			{
				this.AssSubBranchName =string.Empty;
			}
		    if(row["ASB_Lev"]!=null && row["ASB_Lev"]!=DBNull.Value)
			{
			    this.AsbLev = (string)row["ASB_Lev"];
			}
			else
			{
				this.AsbLev =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["Asis_ID"] = this.AsisId;
			row["Ass_Sub_Branch_ID"] = this.AssSubBranchId;
			row["Ass_Sub_Branch_Name"] = this.AssSubBranchName;
			row["ASB_Lev"] = this.AsbLev;
		}
		#endregion
	}
}
#endregion
